package cn.huanzi.qch.baseadmin.sys.books.controller;

import cn.huanzi.qch.baseadmin.common.controller.CommonController;
import cn.huanzi.qch.baseadmin.sys.books.pojo.Books;
import cn.huanzi.qch.baseadmin.sys.books.repository.BooksRepository;
import cn.huanzi.qch.baseadmin.sys.books.vo.BooksVo;
import lombok.extern.slf4j.Slf4j;
import org.apache.tomcat.util.http.fileupload.IOUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;

@Slf4j
@RestController
@RequestMapping("/books/manage")
public class BooksController extends CommonController<BooksVo, Books, String> {

    @Autowired
    private BooksRepository booksRepository;

    @GetMapping("addPage")
    public ModelAndView addPage(){
        return new ModelAndView("sys/bookcard/add");
    }

    @GetMapping("examingPage")
    public ModelAndView examingPage(){
        return new ModelAndView("sys/bookcard/examing");
    }

    @GetMapping("passPage")
    public ModelAndView passPage(){
        return new ModelAndView("sys/bookcard/pass");
    }



}